import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    redirect:"/login"
  },
  {
    path: '/login',
    name: 'login',
    component: () => import(/* webpackChunkName: "about" */ '../views/Login')
  },
  {
    path: '/index',
    name: 'index',
    redirect: '/Home',
    component: () => import('../views/index'),
    children:[
        //首页面
      {
        path: '/Home',
        component: () => import('../views/home')
      },
        //个人中心
      {
        path: '/userCenter',
        component: () => import('../views/UserCenter')
      },
      //修改密码
      {
        path: '/updUserPassword',
        component: () => import('../views/UpdUserPassword')
      },
      {
        path: '/system/dept',
        component: () => import('../views/system/dept')
      },
      {
        path: '/system/user',
        component: () => import('../views/system/user')
      },
      {
        path: '/system/role',
        component: () => import('../views/system/role')
      },
      {
        path: '/system/menu',
        component: () => import('../views/system/menu')
      },
      {
        path: '/system/dict',
        component: () => import('../views/system/dictType')
      },
      {   //通知公告
        path: "/system/notice",
        component: () => import("@/views/system/Notice")
      },
      {   //登录日志管理
        path: "/system/log_login",
        component: () => import("@/views/system/LoginLog")
      },
      {
        path: '/system/log_opt',
        component: () => import('../views/system/OperLog')
      },
      {   //检查费用设置
        path: "/system/ins_fee",
        component: () => import("@/views/system/InspectionFee")
      },
      {   //挂号费用设置
        path: "/system/reg_fee",
        component: () => import("@/views/system/RegistrationFee")
      },
      {   //页面跳转字典数据
        path: "/dict/data/:dictId",
        component: () => import("@/views/system/data")
      },


//    数据统计路由
      {   //收支统计
        path: "/statistics/revenue",
        name:'revenue',
        component: () => import("@/views/statistics/Revenue")
      },
      {   //药品销售统计
        path: "/statistics/sales",
        name:'sales',
        component: () => import("@/views/statistics/Sales")
      },
      {   //检查项目统计
        path: "/statistics/check",
        name:'check',
        component: () => import("@/views/statistics/Check")
      },
      {   //年月报表统计
        path: "/statistics/yearmonth",
        name:'yearmonth',
        component: () => import("@/views/statistics/Yearmonth")
      },
      {   //工作量统计
        path: "/statistics/workload",
        name:'workload',
        component: () => import("@/views/statistics/Workload")
      },


//    药品进销存路由
      {   //厂家信息维护
        path: "/stock/producter",
        name:'producter',
        component: () => import("@/views/stock/Producter")
      },
      {   //药品信息维护
        path: "/stock/medicinal",
        name:'medicinal',
        component: () => import("@/views/stock/Medicinal")
      },
      {   //供应商维护
        path: "/stock/provider",
        name:'provider',
        component: () => import("@/views/stock/Provider")
      },
      {   //采购入库
        path: "/stock/purchase",
        name:'purchase',
        component: () => import("@/views/stock/Purchase")
      },
      {   //入库审核
        path: "/stock/examine",
        name:'examine',
        component: () => import("@/views/stock/Examine")
      },
      {   //入库审核 新增采购
        path: "/views/stock/newPurchase",
        name:'newPurchase',
        component: () => import("@/views/stock/newPurchase")
      },
      {   //入库审核 查询
        path: "/views/stock/editPurchase",
        name:'editPurchase',
        component: () => import("@/views/stock/editPurchase")
      },
      {   //库存查询
        path: "/stock/inventory",
        name:'inventory',
        component: () => import("@/views/stock/Inventory")
      },

//    收费管理路由
      {   //处方收费
        path: "/charge/docharge",
        name:'docharge',
        component: () => import("@/views/charge/Docharge")
      },
      {   //收费列表
        path: "/charge/chargelist",
        name:'chargelist',
        component: () => import("@/views/charge/Chargelist")
      },
      {   //处方退费
        path: "/charge/backfee",
        name:'backfee',
        component: () => import("@/views/charge/Backfee")
      },
      {   //退费查询
        path: "/charge/backfeelist",
        name:'backfeelist',
        component: () => import("@/views/charge/Backfeelist")
      },
      {   //处方发药
        path: "/charge/dispensing",
        name:'dispensing',
        component: () => import("@/views/charge/Dispensing")
      },
      //    检查管理路由
      {   //新开检查
        path: "/check/docheck",
        name:'docheck',
        component: () => import("@/views/check/Docheck")
      },
      {   //新开检查
        path: "/check/checkresult",
        name:'checkresult',
        component: () => import("@/views/check/Checkresult")
      },
      {   //新开检查
        path: "/check/checklist",
        name:'checklist',
        component: () => import("@/views/check/Checklist")
      },

//    看病就诊路由
      {   //门诊挂号
        path: "/doctor/registered",
        name:'registered',
        component: () => import("@/views/doctor/Registered")
      },
      {   //挂号列表
        path: "/doctor/registeredlist",
        name:'registeredlist',
        component: () => import("@/views/doctor/Registeredlist")
      },
      {   //新开就诊
        path: "/doctor/newcare",
        name:'newcare',
        component: () => import("@/views/doctor/Newcare")
      },
      {   //就诊列表
        path: "/doctor/carelist",
        name:'carelist',
        component: () => import("@/views/doctor/Carelist")
      },
      {   //我的排班
        path: "/doctor/myscheduling",
        name:'myscheduling',
        component: () => import("@/views/doctor/Myscheduling")
      },
      {   //医生排班
        path: "/doctor/scheduling",
        name:'scheduling',
        component: () => import("@/views/doctor/Scheduling")
      },
      {   //患者库
        path: "/doctor/patient",
        name:'patient',
        component: () => import("@/views/doctor/Patient")
      },
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
